package com.example.service.impl;


import com.example.mapper.HospitalMapper;
import com.example.pojo.Hospital;
import com.example.service.HospitalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HospitalServiceImpl implements HospitalService {
    @Autowired
    private HospitalMapper hospitalMapper;

    @Override
    public List<Hospital> listAllHospitals() {
        return hospitalMapper.getAllHospitals();
    }
    @Override
    public int getTotalHospitalCount() {
        return hospitalMapper.getTotalHospitalCount();
    }

    @Override
    public Hospital getHospitalById(Integer hpId) {
        return hospitalMapper.getHospitalById(hpId);
    }
}
